<!DOCTYPE html>
<html>
<body>
<p id="demo">一个段落222</p>
<script src="myScript.js"></script>

<button type="button" onclick="but1()">点1</button>
<button type="button" onclick="but2()">点2</button>

<script>
function but1() 
{
    alert("but1")
}
function but2() 
{
    document.getElementById("demo").innerHTML = ("4+5="+(4+5))
}
</script>

</body>
</html>